﻿SELECT 
	(SELECT COUNT(*) FROM NHFAuto.Store) AS Store,
	(SELECT COUNT(*) FROM NHFAuto.Product) AS Product,
	(SELECT COUNT(*) FROM NHFAuto.StoreProduct) AS StoreProduct,
	(SELECT COUNT(*) FROM NHFAuto.Employee) AS Employee
GO

SELECT s.Name AS Store, p.Name AS Product
FROM NHFAuto.Store AS s
INNER JOIN NHFAuto.StoreProduct AS sp On sp.StoreId = s.Id 
INNER JOIN NHFAuto.Product AS p On p.Id = sp.ProductId 
GO

SELECT s.Name AS Store, e.FirstName + E.LastName AS Employee
FROM NHFAuto.Store AS s
INNER JOIN NHFAuto.Employee AS e On E.StoreId = S.Id 
GO

SELECT * FROM NHFAuto.Store
GO
SELECT * FROM NHFAuto.Product
GO
SELECT * FROM NHFAuto.StoreProduct 
GO
SELECT * FROM NHFAuto.Employee
GO

TRUNCATE TABLE NHFAuto.Employee
GO
TRUNCATE TABLE NHFAuto.StoreProduct
GO
DELETE FROM NHFAuto.Store
GO
DELETE FROM NHFAuto.Product
GO
